home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / Windows / System32 / HTMLRE90.DLL / HTML / 11348 < prev    next >
Encoding:
Text File  |  2002-07-05  |  8.9 KB  |  359 lines

  1. <html>
  2.  
  3. <head>
  4.  
  5. <LINK REL="stylesheet" TYPE="text/css" HREF="%6css/default.css">
  6.  
  7. <script language="Javascript">
  8. //LOCALIZATION STRINGS
  9. var _strAddConfirm = "You have chosen to add an alias that belongs to an existing Enterprise user. Do you want to continue?";
  10. var _strLastAlias =  "You have chosen to reassign the only alias of another user. This action will remove that user and its associated home folder from the system. Do you want to continue?";
  11. var _strConfirmContinue = "If you continue, the changes you have made will not be applied.  Do you wish to continue?";
  12. var _errNoAlias = "You cannot submit this form until 1 or more aliases have been selected";
  13.  
  14. </script>
  15.  
  16. <SCRIPT LANGUAGE="JavaScript">
  17.  
  18. function init()
  19. {
  20.   // Remove the formatting options
  21.   document.object_prop.targets.options[0] = null; 
  22.   document.object_prop.choices.options[0] = null; 
  23. }
  24.  
  25. function OnSubmit()
  26. {
  27.   if (!modifyValues())
  28.     return; 
  29.  
  30.   document.forms[0].submit(); 
  31. }
  32.  
  33. function OnCancel()
  34. {
  35.   window.parent.location = "%7"; 
  36. }
  37.  
  38. function addTarget()
  39. {
  40.   for (count = 0; count < document.object_prop.choices.options.length;  ++count)
  41.   {
  42.     current_target = document.object_prop.choices.options[count];
  43.  
  44.     if (current_target.selected)
  45.     {  
  46.       current_target = document.object_prop.choices[count];
  47.     
  48.       option = new Option(current_target.text, current_target.value, false, false); 
  49.       document.object_prop.targets.options[document.object_prop.targets.options.length] = option; 
  50.     }
  51.   }
  52.   for (count = document.object_prop.choices.options.length -1; count >= 0; --count)
  53.   {
  54.     current_target = document.object_prop.choices.options[count];
  55.     if (current_target.selected)
  56.     {
  57.       document.object_prop.choices.options[count] = null; 
  58.     }
  59.   }
  60. }
  61.  
  62. function addAllTargets()
  63. {
  64.   // Run through the options and remove the current selections
  65.   for (count = 0; count < document.object_prop.choices.options.length;  ++count)
  66.   {
  67.     current_target = document.object_prop.choices.options[count];
  68.       
  69.     // remove the object from the current targets
  70.     target_name = current_target.text;
  71.     target_id   = current_target.value; 
  72.     
  73.     // Create a new option
  74.     option = new Option(target_name, target_id, false, false); 
  75.  
  76.     // add it to the possible targets
  77.     document.object_prop.targets.options[document.object_prop.targets.options.length] = option
  78.   }
  79.   document.object_prop.choices.length = 0;
  80. }
  81.  
  82. function deleteTarget()
  83. {
  84.   // Remove a specific target
  85.   // Run through the options and remove the current selections
  86.   for (count = 0; count < document.object_prop.targets.options.length; ++count)
  87.   {
  88.     current_target = document.object_prop.targets.options[count];
  89.   
  90.     if (current_target.selected)
  91.     {
  92.       // remove the object from the current targets
  93.       target_name = current_target.text;
  94.       target_id   = current_target.value; 
  95.       
  96.       // Create a new option
  97.       option = new Option(target_name, target_id, false, false); 
  98.  
  99.       // add it to the possible options
  100.       document.object_prop.choices.options[document.object_prop.choices.options.length] = option;
  101.     }
  102.   }
  103.  
  104.   for (count = document.object_prop.targets.options.length -1; count >= 0; --count)
  105.   {
  106.     current_target = document.object_prop.targets.options[count];
  107.  
  108.     if (current_target.selected)
  109.     {
  110.       document.object_prop.targets.options[count] = null;
  111.     }
  112.   }
  113. }
  114.  
  115. function deleteAllTargets()
  116. {
  117.   // Run through the options and remove the current selections
  118.   for (count = 0; count < document.object_prop.targets.options.length; ++count)
  119.   {
  120.     current_target = document.object_prop.targets.options[count];
  121.       
  122.     // remove the object from the current targets
  123.     target_name = current_target.text;
  124.     target_id   = current_target.value; 
  125.  
  126.     // Create a new option
  127.     option = new Option(target_name, target_id, false, false); 
  128.  
  129.     // add it to the possible targets
  130.     document.object_prop.choices.options[document.object_prop.choices.options.length] = option
  131.   }
  132.   document.object_prop.targets.options.length = 0;
  133. }
  134.  
  135. function modifyValues()
  136. {
  137.   final_value = ""; 
  138.   first = true; 
  139.   old_info = false; 
  140.   last_nt_alias = false; 
  141.  
  142.   if (document.object_prop.targets.options.length == 0)
  143.   {
  144.         alert(_errNoAlias); 
  145.         return false;
  146.   }
  147.  
  148.   for (count = 0; count < document.object_prop.targets.options.length; ++count)
  149.   {
  150.     if (!first)
  151.     {
  152.       final_value += "+"; 
  153.     }
  154.     else first = false; 
  155.  
  156.     current_target = document.object_prop.targets.options[count];  
  157.  
  158.     temp_value = current_target.value;
  159.  
  160.     if (temp_value.charAt(0) == '*')
  161.     {
  162.       final_value += temp_value.substring(1); 
  163.       old_info = true; 
  164.     }
  165.     else if (temp_value.charAt(0) == '%')
  166.     {    
  167.         final_value += temp_value.substring(1);
  168.         last_nt_alias = true; 
  169.     }
  170.     else final_value += current_target.value; 
  171.   }
  172.   if (old_info)
  173.   {
  174.     if (!confirm(_strAddConfirm))
  175.     {    
  176.       return false; 
  177.     }
  178.   }
  179.   if (last_nt_alias)
  180.   {
  181.     if (!confirm(_strLastAlias))
  182.     {
  183.       return false; 
  184.     }
  185.   }
  186.  
  187.   // Build the string
  188.   document.object_prop.selectedChoices.value = final_value;
  189.   return true; 
  190.   
  191. }
  192.  
  193. function doFilter()
  194. {
  195.   if (NoItemsSelectedOrDoNotCare())
  196.   {
  197.     url = "%9" + escape(document.object_prop.filter.value);
  198.     location.href = url;
  199.   }
  200. }
  201.  
  202. function doPrevious()
  203. {
  204.   if (NoItemsSelectedOrDoNotCare())
  205.   {
  206.     url = "%11";
  207.     location.href = url;
  208.   }
  209. }
  210.  
  211. function doNext()
  212. {
  213.   if (NoItemsSelectedOrDoNotCare())
  214.   {
  215.     url = "%12";
  216.     location.href = url;
  217.   }
  218. }
  219.  
  220. function NoItemsSelectedOrDoNotCare()
  221. {
  222.   if (document.object_prop.targets.options.length == 0)
  223.     return true;
  224.   else
  225.     return window.confirm (_strConfirmContinue)
  226. }
  227.  
  228.  
  229. </SCRIPT>
  230.  
  231. <BODY onload="init();">
  232.  
  233. <FORM action="%2" target="_parent" method="post" name="object_prop" onSubmit="return modifyValues()">
  234.  
  235. <div align="center">
  236.  
  237. <strong> %3 </strong>
  238.  
  239. </div>
  240.  
  241. <BR>
  242. <BR>
  243.  
  244. <table CELLPADDING="0" CELLSPACING="2" border=0>
  245.   <tr>
  246.   <td class="list" align> Look For: <input type="text" name="filter" value="%8" size=15> </td> 
  247.   <td align="left" colspan=2>
  248.     <table>
  249.     <tr>
  250.       <td><table cellpadding=0><tr>
  251.       <td class="clsButton" align=middle nowrap>
  252.        <div class="clsButton"> <A HREF="javascript:doFilter()">Find Now</A> </div>
  253.       </td></tr></table>
  254.     </td>
  255.     </tr>
  256.   </table>
  257.     </td>
  258.   </tr>
  259. </table>
  260.  
  261. <BR>
  262.  
  263. <div align="center">
  264.  
  265. <table align=center CELLPADDING="0" CELLSPACING="0" border=0 width=100%>
  266.   <tr> 
  267.   <td class="list" colspan=2 align=left>  %4 </td>
  268.   <td class="list" align=left> %5 </td> 
  269.   </tr>
  270.  
  271.   <tr>
  272.   <td class="list" align=left>
  273.     <SELECT multiple NAME="choices" SIZE=10 width="200px">
  274.       <OPTION> This is a formatting string </OPTION>
  275.       %1
  276.     </SELECT>
  277.   </td>
  278.   
  279.   <td>
  280.   <table>
  281.     <tr><td align=middle>
  282.     <table cellpadding=0 border=0 align=center> 
  283.       <tr>      
  284.         <td class="clsButton" align=middle nowrap> 
  285.           <div class="clsButton"><a href="javascript:addTarget()">    >    </a></div>
  286.         </td>
  287.       </tr>
  288.     </table> 
  289.     </td></tr>
  290.  
  291.     <tr><td align=middle>
  292.     <table cellpadding=0 border=0 align=center> 
  293.       <tr> 
  294.         <td class="clsButton" align=middle nowrap> 
  295.           <div class="clsButton"><a href="javascript:addAllTargets()">   >>   </a></div>
  296.         </td>
  297.       </tr>
  298.     </table> 
  299.     </td></tr>
  300.  
  301.     <tr><td align=middle>
  302.     <table cellpadding=0 border=0 align=center> 
  303.       <tr>  
  304.         <td class="clsButton" align=middle nowrap>   
  305.           <div class="clsButton"><a href="javascript:deleteTarget()">    <    </a></div> 
  306.         </td>
  307.       </tr>
  308.     </table> 
  309.     </td></tr>
  310.  
  311.     <tr><td align=middle>
  312.     <table cellpadding=0 border=0 align=center> 
  313.       <tr>   
  314.         <td class="clsButton" align=middle nowrap>   
  315.           <div class="clsButton"><a href="javascript:deleteAllTargets()">   <<   </a></div>
  316.         </td>
  317.       </tr>
  318.     </table>
  319.     </td></tr>
  320.   </table>
  321.   </td>
  322.  
  323.  
  324.   <td class="list" align=left>
  325.     <SELECT multiple NAME="targets" SIZE=10 width="200px">
  326.       <OPTION> This is a formatting string </OPTION>
  327.     </SELECT>
  328.   </td>
  329.   </tr> 
  330.  
  331.    <tr> 
  332.     <td> 
  333.       %10
  334.     </td> 
  335.    </tr>
  336.  
  337.   </table>
  338.  
  339. <BR>
  340.  
  341. <table align=center CELLPADDING="0" CELLSPACING="5" border=0> 
  342.   <tr>      
  343.     <td class="clsButton" align=middle nowrap> 
  344.       <div class="clsButton"><a href="javascript:OnSubmit()">OK</a></div>
  345.     </td>
  346.     <td class="clsButton" align=middle nowrap> 
  347.       <div class="clsButton"><a href="javascript:OnCancel()">Cancel</a></div>
  348.     </td>
  349.   <tr>
  350. </table>
  351.  
  352. <input type=hidden name="selectedChoices" value = "">
  353.  
  354. </FORM>
  355.  
  356. </div>
  357. </body>
  358. </html>
  359.